package com.kingyun.gpsinspection.purificationservice.services.iam.innerservice.accessory.impl;

import com.kingyun.gpsinspection.purificationservice.dao.mapper.iam.accessory.EntityVoMapper;
import com.kingyun.gpsinspection.purificationservice.facade.model.iam.accessory.EntityVo;
import com.kingyun.gpsinspection.purificationservice.facade.service.iam.accessory.IamEntityVoService;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * Created by ${yangsy} on 2017/3/18.
 */
public class IamEntityVoServiceImpl implements IamEntityVoService
{
    private static org.slf4j.Logger logger = LoggerFactory.getLogger(IamEntityVoServiceImpl.class);
    @Autowired
    private EntityVoMapper entityVoMapper;

    @Override
    public List<EntityVo> queryList(EntityVo entityVo) {
        if(entityVo == null){
            return null;
        }
        List<EntityVo> list = null;
        try {
            list =  entityVoMapper.queryList(entityVo);
        }catch (Exception e){
            logger.error("获取生产实体数据异常："+e.getMessage());
        }
        return null;
    }

    @Override
    public List<EntityVo> queryList(String entityTypeId, String orgId) {
        EntityVo entityVo = new EntityVo();
        entityVo.setEntityTypeId(entityTypeId);
        entityVo.setParentOrgId(orgId);
        return entityVoMapper.queryListNotPaging(entityVo);
    }
}
